<? startScript('jquery, jquery.tools'); ?><script type="text/javascript">
	jQuery(function($) { $("ul.jt-tabs").tabs("div.jt-panes > div"); });
</script><? endScript(); ?>

<form action="" method="post" enctype="multipart/form-data">

<? if (sizeof($DIAGS)) { ?>
	<div class="diags"><p><?=implode("</p><p>", $DIAGS)?></p></div>
<? } ?>


<ul class="jt-tabs"><?

	foreach($DATA['langs'] as $lang) {
		?><li><a href="#<?=$lang['text']?>"><?=$lang['assoc']?></a></li><? 
	} 
	
?></ul>

<div class="jt-panes">

	<? $t = true; 
		foreach($DATA['langs'] as $lang) { $l = $lang['text'];

		?><div class="jt-pane" style="<?=$t ? "display:block" : ""?>">

			<p><label><?=t('Title', 'cpn')?><br />
				<input type="text" class="xwide" name="title[<?=$l?>]" value="<?=hdat('object', 'data', $l, 'title')?>" /></label>
			</p>

			<p><label><?=t('Unique ID', 'cpn')?><br />
				<input type="text" class="xwide" name="article[<?=$l?>]" value="<?=hdat('object', 'data', $l, 'article')?>" /></label>
			</p>

			<p><label><?=t('Description', 'cpn')?>
				<textarea name="body[<?=$l?>]" cols="80" rows="25"><?=dat('object', 'data', $l, 'body')?></textarea></label>
			</p>

		</div><? 
	
	$t = false; } ?>

</div>

<p><input type="submit" name="editor_save" value="<?=ht('Save', 'cpn')?>" />
	<? if (!($DATA['object']['attr'] & AA_VISIBLE)) { ?><input type="submit" name="editor_save_enable" value="<?=ht('Save and Enable', 'cpn')?>" /><? } ?>
</p>

</form>
